#include <stdio.h>
#include"fft.h"

void FFT_TestRunTime(void)

{

    double TimeRun;     //运行期间定时器计数值
    _LARGE_INTEGER TimeStart;    //开始时定时器计数值
    _LARGE_INTEGER TimeEnd;        //结束时定时器计数值
    _LARGE_INTEGER TimeFreq;    //定时器频率
    QueryPerformanceFrequency(&TimeFreq);
    FFT_WriteData();
    QueryPerformanceCounter(&TimeStart);    //计时开始
    FFT_Calculate(gsta_FFT_DataTemp, fft_N);
    FFT_AnalyzeData();
    QueryPerformanceCounter(&TimeEnd);    //计时结束

    TimeRun = 1000000*(TimeEnd.QuadPart-TimeStart.QuadPart)/TimeFreq.QuadPart;
    printf("\nN=%d FFT_RunTime: %fus\n",fft_N,TimeRun);       
}

int main() {
    FFT_WriteData();
    FFT_Calculate(gsta_FFT_DataTemp, fft_N);
    FFT_AnalyzeData();
    FFT_ReadData();
    FFT_TestRunTime();
    return 0;
}
